#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QVBoxLayout>
#include <QTableWidget>
#include <QPushButton>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_actionExit_triggered();

    QStringList on_actionOpenfileDialog_triggered();

    void on_actionFolderOpened_triggered();

    void on_actionResetWindowLayout_triggered();

    void on_actionDeteleRow_triggered();

    void on_tableWidget_Hex2Bin_cellDoubleClicked(int row, int column);

    void on_actionTransitioningContent_triggered();

    void on_pushButton_transmit_clicked();

    void on_actionAddToRowAbove_triggered();

    void on_actionAddToRowBelow_triggered();

    void on_actionAddToRowBottom_triggered();

    void on_actionDeleteAllRow_triggered();

    void on_tableWidget_BinMerge_cellDoubleClicked(int row, int column);

    void on_binMergeOpenFloder_PushButton_clicked();

    void on_pushButton_BinMerge_clicked();

private:
    enum    CellType{cSelect, cInput, cOutput, cAddress}; //各单元格的类型
    void UI_Init(void);
    void connectSignalsSlots();
    QPushButton *binMergeOpenFloder_PushButton;
    Ui::MainWindow *ui;
    QStringList getFileListFromFolder();
    void tabHex2BinCreateItemARow(int rowNo,bool isCheck);
    void tabBinMergeCreateItemARow(int rowNo,bool isCheck);
    void tabHex2BinInit();
    void tabBinMergeInit();
    QTableWidget* getTableObjectByTabIndex();
};
#endif // MAINWINDOW_H
